QuoEdit (formerly QEdit) is a simple monostyled text editor that runs on System 7 or later versions of Mac OS.
QuoEdit is also AppleScript aware. If you are not friendly with AppleScript or Apple events and cannot understand about the terms, you can skip those sections.
•1 What’s New
1.1 Changed from version 0.30
1.1.1 Application’s settings
Informations format that QuoEdit uses internally was changed. Please reset application’s preferences with Edit/View, Edit/Misc Apple Props and Windows/First Position dialog boxes as needed.
1.1.2 Less restriction of memory
Formerly, document data size that QuoEdit could edit depended on the application’s memory. Now, QuoEdit uses temporary memory in many cases and it mainly depends on the computer’s available memory.
1.1.3 Undo levels
Formerly, QuoEdit supported three fixed levels of undo/redo and undo data could be purged when the memory was tight. Now, the max level can be specified within from 1 to 10 and the data is not purged until the max level is decreased.
1.1.4 Gray invisible characters
Return and tab characters are now displayed with gray color.
1.1.5 Minimum leading
Minimum leading (line height) had been the default value for the each font and font size. It is now the same value as the font size. But note that lines can be displayed improperly with too small leading.
1.1.6 Boolean (true/false) option of AppleScript parameters
QuoEdit had used yes/no option for two parameters of “find” in AppleScript like this:
find extending selection yes
Now, QuoEdit uses true/false option about them like:
find extending selection true
which is compiled like:
find with extending selection
because I recently noticed this is more formal.
But QuoEdit will still continue to understand yes/no option so that you have not to modify scripts ever written.
1.1.7 Parameter format of “arrange windows” in AppleScript
The format of this optional parameter was formerly like this:
arrange windows stacking yes
Now, the stacking direction for windows can be specified with up or down like this:
arrange windows stacking up
Sorry about you have to modify this option format if you have written scripts with this parameter. (“arrange windows” is new from version 0.3)
1.2 Significant new features of version 0.31
1.2.1 Shortcut key for jumping tab
With cmd-tab key, it jumps to the next tab stop in the paragraph if any.
Adding option key, it jumps to the previous tab character in the paragraph if any.
1.2.2 “Do key”
By this new Apple event, keyboard equivalent actions like moving caret are scriptable. The following is example of “cmd-shift-right arrow” equivalent.
do key _right with {_cmd, _shift}
1.2.3 Last Script command in Options menu
Repeats the script last executed.
The shortcut key is cmd-shift-u.
1.2.4 Option to turn off TSM
I learned that several imput methods are buggy about inline input and adding this option will save their lives. (Thanks again for the information!) Refer to 2.2.9.4.
1.2.5 Option to output as styled text
It’s for copy/cut commands and dragging out. Refer to 2.2.9.3.
1.2.6 Reading a style of SimpleText document
If the SimpleText document is monostyled, QuoEdit now reads the font, font size and leading (line height) informations.
1.2.7 Optional parameters for copy, cut and paste event
About copy event, refer to also 4.7.
1.3 Bugs fixed in version 0.31
1.3.1 Recording select event
When recording with Script Editor, select events are recorded more than needed. The problem was fixed.
1.3.2 Stopping script with cmd-period
When script that was started from QuoEdit’s Execute Script command is running, formerly it could be stopped with cmd-period key by AppleScript but in version 0.30 it could not be for some reason. Now it can be done again.
1.3.3 Error with special font
When QuoEdit try to display text with tab characters with special font whoose small "n" code character’s width is zero, system error occured because QuoEdit uses "n" character’s width as unit of tab stop for 1-byte language fonts. The problem was fixed.
1.3.4 Others
Other tiny bugs are removed.
•2 Menus & Commands
2.1 File
2.1.1 New
2.1.2 Open
2.1.3 Close
To close every document, hold down option key.
2.1.4 Save
To save every document, hold down option key.
2.1.5 Save as
Shortcut key is cmd-shift-s.
2.1.6 Revert
Shortcut key is cmd-shift-r.
2.1.7 Insert File
With option key, any file’s data can be inserted (but not resources).
About the shortcut key, be careful typing cmd-o or cmd-i. And ensuring always the default button’s name is recommended.
2.1.8 Page Setup
Shortcut key is cmd-shift-p.
To set default state, do it after closing all windows.
2.1.9 Print Options
Shortcut key is cmd-option-p.
2.1.10 Print
2.1.11 Quit
2.2 Edit
2.2.1 Undo / Redo
Up to 10 levels of undo/redo are available for each document. The max levels can be specified at Misc Appl Props dialog box.
Shortcut key for redo is cmd-shift-z.
2.2.2 Cut
2.2.3 Copy
2.2.4 Paste
2.2.5 Clear
2.2.6 Select All
2.2.7 View
Items of View dialog box just effect view on the display. For example, though document windows can be inverted or meshed, results of printing documents are always normal. And showing return characters does not effect whether or not to print them.
By turning this option on, the selection at the last saved time (not closed time) can be remembered.
2.2.9.3 Styled Output
Option to pass the selected text as a styled text when copy, cut or dragging out is done. It will be useful for foreign languages whose script is different from the system script.
2.2.9.4 TSM aware
All services of TSM (Text Services Manager) that QuoEdit currently supports is inline input. Inline input is an input mode for 2-byte languages (Japanese, Chinese and Korean).
2.2.9.5 Caret Speed
Try it if you are not satisfied with the top speed of the Keyboard control panel. But there will be no effect with old CPU. In that case, select normal (1) speed.
2.2.9.6 Undo Levels
Currently 1-10. Any more request?
2.3 Search
2.3.1 Find
2.3.2 Find Backward Again
2.3.3 Find Forward Again
2.3.4 Enter Selection
Enters current selection to the “Search for” string. Adding option key, it enters the selection to the “Replace with” string.
2.3.5 Replace
2.3.6 Replace & Find Next
2.3.7 Replace All
2.3.8 Jump To
2.4 Windows
2.4.1 Window Size
Specifying ‘-1’ in the dialog box, especially for the height, has the special meaning.
2.4.2 Zoom
2.4.3 First Position
The position for new windows can be defined to avoid jam at the upper left area of the monitor.
2.4.4 Arrange
Rearranges windows according to the information set with the First Position dialog box. Not only windows but it also rearranges shortcut keys in the Windows menu items.
With option key, stacked up.
With option-shift keys, stacked down.
2.5 Options
2.5.1 Last Script
Shortcut key is cmd-shift-u.
2.5.2 Execute Script
Executes script in “Scripts” folder in QuoEdit’s folder (or other folders) by keaboard shortcuts. Of course you can write your own scripts and put them into the folder.
It requires AppleScript installed on the computer.
With option key, it makes the Finder open the file if the Finder is scriptable*. Other commands which uses the standard file dialog box (Open, Insert File) do the similar thing too.
* About System 7.5 or later, no problem. About System 7.1, Finder version 7.1 is not scriptable but Finder version 7.1.3 and “Finder Scripting Extension” make it scriptable.
2.5.3 Launch Applications
Makes switching to other application in “Applications” folder in QuoEdit’s folder (or other folders) possible. Put files like scripts saved as applications or applications’ aliases into the folder as you like.
2.5.4 Speak
If Speech Manager is installed on your computer, this command is enabled and QuoEdit can make your computer speak. But only languages Speech Manager supports.
Since QuoEdit passes a copy of text to the Speech Manager just once, you can freely edit the text while computer is speaking.
•3 Miscellaneous
3.1 Data size
Document data size that QuoEdit can edit depends mainly on the computer’s available memory. (formerly, only on the application’s memory)
3.2 Drag and drop
Drag and drop can be done on the document windows or the Find dialog box. Receiving text files is also available.
(If you are a System 7.0 or 7.1 user, you have to get and install softwares which enable the drag and drop to take advantage of it.)
3.3 Shortcuts guide
If Apple Guide is installed on your computer and “QE Shortcuts” file is in the QuoEdit’s folder, you can see about shortcuts from the guide (Help) menu.
3.4 Properties of each document
Items of every dialog box which has the “Set Default” button are properties of each document and they are saved in each document file (made by QuoEdit) as a resource. For example, whether or not to print return characters specified in Print Options dialog box is a property of each document. (Printing special characters will be useful just for the document to be proofed.)
Print information set in Page Setup dialog box is also a property of each document but whether or not to save it (120 bytes) in the file is selectable in Print Options dialog box. (Versions 0.1.x and 0.2.x always saved it.)
3.5 Right-to-left direction language
If the script system containing WorldScript I is installed on your computer, you can edit text of right-to-left direction language like Arabic or Hebrew with QuoEdit on condition that the contents are not bidirectional, for example, that Hebrew context contains no English words.
If the system direction is right-to-left, editing bidirectional text will be fine except that selection range on the display is always contiguous.
Currently, QuoEdit fixes the line alignment of Hebrew or Arabic font documents to right regardless of the system direction.
3.6 The color
Take it easy, please, if you found, someday, that the color of status bar changes day by day. It’s just a feature of QuoEdit. The beginning is the April Fools’ Day.
3.7 What’s “quo”?
q: quick manipulations (my wish)
u: understandable simple user interface (a little forced wish)
o: OSA (Open Scripting Architecture) aware
About Latin word “quo”, you may want to ask your evangelist.
•4 Topics of AppleScript / Apple Events
4.1 AppleScript aware
AppleScript is a very useful stuff that makes various tasks automated and QuoEdit is AppleScript aware — scriptable and recordable about almost every task other than drag and drop with tools like Script Editor.
(About AppleScript itself, sorry but it is not described here. Please refer to books or documents about AppleScript if you feel necessary.)
4.2 Confusing words
4.2.1 “Command” or “Event”?
About “command” of AppleScript, it is described as “event” in this document from view point of Apple event to distinguish it from application’s menu command.
4.2.2 “Script”?
We will find out two meanings in the word “script” in the Mac OS softwares.
First, a generic term of languages. For example, Roman script contains English language, German language etc. and Japanese script contains only Japanese language. Of course we don’t talk about it here.
Second, executable program or the source text of the program that can be written by the users. Especially, here it means script in the AppleScript form.
So don’t be confused about the word “script”. You will be able to distinguish them in the context.
4.3 Terms
To refer for events and classes that QuoEdit supports, do Open Dictionary command of the Script Editor and choose QuoEdit.
4.4 A restriction of AppleScript
I learned the maximum text length AppleScript can treat is 30000 bytes. (I remember some Apple’s document exactly described it is 30000 bytes but forgot what document it was. Anyone know?)
But if QuoEdit and AppleScript don’t send text each other, the restriction does not matter.
For example, when you select a large text and let AppleScript do a script that contains the following statement, a system error can actually occur.
if selection as text is not "" then
To avoid the problem, replace it with the following.
if 0 < length of selection then
4.5 Transliterate
When this event is sent to QuoEdit, It just passes a translation of the order to a Mac OS toolbox rootine called “TransliterateText” and replace the specified original text with the result text.
Currently, the results of 1-byte <--> 2-byte conversion for Asian languages are not perfect and it may be problem of resources that TransliterateText rootine uses. About this issue, please ask Apple Computer.
About the the max text length that TransliterateText rootine can treat, it seems to be 65535 bytes that is the max 2-byte integer. (I got the value from my experiments.)
4.6 Cut/copy/paste
Before letting QuoEdit do these things by script, activate QuoEdit if not active because applications usually can’t cut, copy or paste properly at background. Attention that QuoEdit explicitly avoids error message about this issue.
4.7 Do copy
From version 0.31, QuoEdit has “ignoring selection error” parameter (which ignores no-user-selection error) for “cut” and “copy” events optionally but AppleScript (version 1.1) will not accept the parameter for “copy”. (About “cut”, it’s OK.) In that case, try “do copy” which is just a dummy name of “copy” to fool the AppleScript.
AppleScript may try interpreting “copy” something different way from other events because “copy” is a standard command of AppleScript while it is also event name many applications support. When cut is OK but copy is not, try “do copy”.
4.8 Definite index for some class objects
About file class that belongs to document class, only 1 is available as the index like this:
file 1 of document "Things To Do!"
About script class that belongs to application class, currently only -1 or “last” which means last executed script are available as the index like this:
last script of application "QuoEdit"
•5 Environment
This version of QuoEdit was developed and tested mainly or only on the following environment.
Computer: Macintosh LC475
(tuned to 33MHz with FPU; tuning not recommended)
OS: Mac OS 7.6.1, System 7.5.1, 7.1, Mac OS 8
and several Language Kits
Development tools:
Symantec C++ version 7.0 (C language)
Guide Maker 1.4b3
Keyboard: Apple Keyboard II
Printer: PC-PR1000EW, NEC
Printer driver: MacPrint Pages ver.1.0.1, Kansai Electric
•6 Distribution
QuoEdit 0.31 is a freeware. You can distribute it to your friends.
QuoEdit is copyrighted and all rights to it are reserved by the author Lyomei Sakai.
Scripts in “Scripts” folder are also copyrighted but I will not insist on them. You may, I think, use those scripts on your responsibility.
I will not take responsibility for results of using QuoEdit. But I will appreciate your bug reports or advices.
•7 Acknowledgements
Thanks to people who gave me nice messages! And many thanks to people who gave me informations or nice advices for improvement of QuoEdit!